/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { CqBasicModel, Page } from '../../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmPressuretest extends CqBasicModel<PmPressuretest> {
  createDate?: string; // 试压日期
  name?: string; // name
  projectno?: string; // 工程编码
  projectname?: string; // 工程名称
  checker?: string; // 审核人
  checkdate?: string; // 审核时间
  result?: string; // 试压结果
  pic?: string; // pic
  oper?: string; // 填写人
  discharge?: string; // 水流量(立方米)
  hydraulichressure?: string; // 水压(MPa)
}

export const pmPressuretestList = (params?: PmPressuretest | any) =>
  defHttp.get<PmPressuretest>({ url: adminPath + '/process/pressure/pmPressuretest/list', params });

export const pmPressuretestListData = (params?: PmPressuretest | any) =>
  defHttp.post<Page<PmPressuretest>>({
    url: adminPath + '/process/pressure/pmPressuretest/listData',
    params,
  });

export const pmPressuretestForm = (params?: PmPressuretest | any) =>
  defHttp.get<PmPressuretest>({ url: adminPath + '/process/pressure/pmPressuretest/form', params });

export const pmPressuretestSave = (params?: any, data?: PmPressuretest | any) =>
  defHttp.postJson<PmPressuretest>({
    url: adminPath + '/process/pressure/pmPressuretest/save',
    params,
    data,
  });

export const pmPressuretestDelete = (params?: PmPressuretest | any) =>
  defHttp.get<PmPressuretest>({
    url: adminPath + '/process/pressure/pmPressuretest/delete',
    params,
  });
